<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/10/22
 * Time: 16:04
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\common\validate;


class Auth extends Base
{
    protected $rule = [
        "nickName" => "require|max:20",
        "sex" => "require|in:0,1,2|integer",
        "mobile" => "require|mobile",
        "wx" => "require|alphaDash",
        "school" => "require",
        "xueji" => "require",
        "idCard" => "require|idCard",
        "idPath" => "require",
        "idPathF" => "require",
        "idSchool" => "require",
        "schoolPath" => "require"
    ];
    protected $message = [
        "nickName.require" => "姓名不能为空",
        "nickName.max" => "姓名长度太长",
        "sex.require" => "请选择性别",
        "sex.in" => "性别格式错误",
        "sex.integer" => "性别格式错误",
        "mobile.require" => "请输入手机号",
        "mobile.mobile" => "手机号格式错误",
        "wx.require" => "请输入微信",
        "wx.alphaDash" => "微信格式错误",
        "school.require" => "请输入学院",
        "xueji.require" => "请输入学籍",
        "idCard.require" => "请输入身份证号",
        "idCard.idCard" => "身份证号格式错误",
        "idPath.require" => "请上传身份证",
        "idPathF.require" => "请上传身份证",
        "idSchool.require" => "请输入学生证号",
        "schoolPath.require" => "请上传学生证照片",
    ];
    protected $scene = [
        "add" => ['nickName', 'sex', 'mobile', 'wx', 'school', 'xueji', 'idCard', 'idPath', 'idSchool', 'schoolPath']
    ];
}